Skip to content

Conversation

@atsushi-kawagoe
Copy link

Copilot Summary

This pull request updates the Chromium integration for AWS Lambda and adds support for newer Node.js runtimes. The main changes include updating Chromium dependencies, improving runtime detection, and refining how environment variables and library paths are set for different Lambda environments.

Dependency and compatibility updates:

  • Updated @sparticuz/chromium to version ^133.0.0 and added @sparticuz/chromium-min for improved support and compatibility. (package.json)
  • Bumped the package version to 133.0.0 to reflect the new Chromium version. (package.json)

Runtime environment detection and configuration:

  • Added a new utility isLambdaRuntimeEnvironmentNode20 to detect Node.js 20.x and 22.x Lambda environments, and refactored code to use it for conditional logic. (src/util/isLambdaRuntimeEnvironmentNode20.ts, src/chromium.ts, src/util/getEnvironmentVariables.ts) [1] [2] [3]
  • Refined the logic for setting the LD_LIBRARY_PATH environment variable, allowing dynamic selection of the base library path depending on the detected Lambda runtime. (src/util/getEnvironmentVariables.ts)

Chromium launch and flags improvements:

  • Changed Chromium launch flags to use --use-gl=angle, --use-angle=swiftshader, and --enable-unsafe-swiftshader for better compatibility with the updated Chromium version. (src/chromium.ts)
  • Adjusted the extraction of binary and library assets to support both AL2 and AL2023 Lambda environments, ensuring the correct libraries are inflated and available based on the runtime. (src/chromium.ts) [1] [2]

Cleanup and refactoring:

  • Removed Node.js 20.x and 22.x from the legacy runtime detection utility to avoid overlap with the new dedicated detection function. (src/util/isLambdaRuntimeEnvironment.ts)

@atsushi-kawagoe
Copy link
Author

@ayumigotooro @orosaeki
レビューよろしくお願いいたします。
package.jsonはバージョンを133.0.0に更新するためマージするブランチの方を適用します。

Copy link

@orosaeki orosaeki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OKと思います

Copy link

@ayumigotooro ayumigotooro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OKと思います

@atsushi-kawagoe atsushi-kawagoe merged commit 9858a35 into main Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants